home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / info-service / gopher / Unix / gopher+1.2b4 / gopherd / gopherdconf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-03-24  |  4.7 KB  |  133 lines

  1. /********************************************************************
  2.  * lindner
  3.  * 3.2
  4.  * 1993/03/24 20:25:46
  5.  * /home/mudhoney/GopherSrc/CVS/gopher+/gopherd/gopherdconf.h,v
  6.  * Exp
  7.  *
  8.  * Paul Lindner, University of Minnesota CIS.
  9.  *
  10.  * Copyright 1991, 1992 by the Regents of the University of Minnesota
  11.  * see the file "Copyright" in the distribution for conditions of use.
  12.  *********************************************************************
  13.  * MODULE: gopherdconf.h
  14.  * Header file for routines in gopherdconf.c
  15.  *********************************************************************
  16.  * Revision History:
  17.  * gopherdconf.h,v
  18.  * Revision 3.2  1993/03/24  20:25:46  lindner
  19.  * Addition for secureusers file
  20.  *
  21.  * Revision 3.1.1.1  1993/02/11  18:02:52  lindner
  22.  * Gopher+1.2beta release
  23.  *
  24.  * Revision 1.2  1993/01/30  23:57:44  lindner
  25.  * Added macros for Geog and Lang
  26.  *
  27.  * Revision 1.1  1992/12/10  23:13:27  lindner
  28.  * gopher 1.1 release
  29.  *
  30.  *
  31.  *********************************************************************/
  32.  
  33.  
  34.  
  35. #ifndef GOPHERDCONF_H
  36. #define GOPHERDCONF_H
  37.  
  38. #include "boolean.h"
  39. #include "STRstring.h"
  40. #include "ext.h"       /** Filename extensions **/
  41. #include "site.h"      /** Hostname/IP security **/
  42.  
  43.  
  44. /**************************************************************************
  45.  * A structure that defines all the changable parameters of a gopher server
  46.  * Read from the file gopherd.conf
  47.  */
  48.  
  49. struct gdconf_struct {
  50.      ExtArray     *Extensions;
  51.      SiteArray    *Sites;
  52.      Accesslevel  Defaccess;       /*** Default access level for unknowns **/
  53.  
  54.      boolean      RunFromInetd;    /*** -I option **/
  55.      boolean      Caching;         /*** -C option **/
  56.      String       *Logfile;        /*** The filename for the logfile **/
  57.      String       *BummerMsg;      /*** Message given to non-secure sites **/
  58.      String       *Data_Dir;       /*** Where our data directory is **/
  59.      String       *Hostname;       /*** A FQDN for the host **/
  60.      int          Port;            /*** The Port we're running at **/
  61.      boolean      chroot;          /*** Are we chroot()ing? **/
  62.  
  63.      boolean      Securityon;      /*** Are we restricting access or not? **/
  64.  
  65.      String       *Admin;          /*** Administrator info **/
  66.      String       *AdminEmail;     /*** E-mail address of administrator **/
  67.      
  68.      String       *Site;           /*** Description of site **/
  69.      String       *Org;            /*** Name of Organization **/
  70.      String       *Loc;            /*** Location of site **/
  71.      String       *Geog;           /*** Latitude and Longitude **/
  72.      String       *Lang;           /*** Default language ***/
  73.  
  74.      String       *Tixfile;        /*** Tickets file ***/
  75.  
  76.      int          TZ;              /*** Timezone **/
  77. };
  78.  
  79. typedef struct gdconf_struct GDCobj;
  80.  
  81. #define GDCgetDefAccess(a)      ((a)->Defaccess)
  82. #define GDCgetInetdActive(a)    ((a)->RunFromInetd)
  83. #define GDCsetInetdActive(a,b)  ((a)->RunFromInetd=(b))
  84. #define GDCgetCaching(a)        ((a)->Caching)
  85.  
  86. #define GDCgetLogfile(a)        STRget((a)->Logfile)
  87. #define GDCsetLogfile(a,b)      STRset((a)->Logfile,(b))
  88. #define GDCgetDatadir(a)        STRget((a)->Data_Dir)
  89. #define GDCgetHostname(a)       STRget((a)->Hostname)
  90. #define GDCsetHostname(a,b)     STRset((a)->Hostname,(b))
  91. #define GDCgetPort(a)           ((a)->Port)
  92. #define GDCgetchroot(a)         ((a)->chroot)
  93. #define GDCgetBummerMsg(a)      STRget((a)->BummerMsg)
  94. #define GDCsetBummerMsg(a,b)    STRset((a)->BummerMsg,(b))
  95.  
  96. #define GDCgetAdmin(a)       STRget((a)->Admin)
  97. #define GDCsetAdmin(a,b)     STRset((a)->Admin,(b))
  98. #define GDCgetAdminEmail(a)  STRget((a)->AdminEmail)
  99. #define GDCsetAdminEmail(a,b) STRset((a)->AdminEmail,(b))
  100. #define GDCgetSite(a)        STRget((a)->Site)
  101. #define GDCsetSite(a,b)      STRset((a)->Site,(b))
  102. #define GDCgetOrg(a)         STRget((a)->Org)
  103. #define GDCsetOrg(a,b)       STRset((a)->Org,(b))
  104. #define GDCgetLoc(a)         STRget((a)->Loc)
  105. #define GDCsetLoc(a,b)       STRset((a)->Loc,(b))
  106. #define GDCsetGeog(a,b)      STRset((a)->Geog,(b))
  107. #define GDCgetGeog(a)        STRget((a)->Geog)
  108. #define GDCgetLang(a)        STRget((a)->Lang)
  109. #define GDCsetLang(a,b)      STRset((a)->Lang,(b))
  110. #define GDCgetTixfile(a)        STRget((a)->Tixfile)
  111. #define GDCsetTixfile(a,b)      STRset((a)->Tixfile,(b))
  112.  
  113. #define GDCgetTZ(a)          (a)->TZ
  114.  
  115. /*
  116.  * Real live functions in gopherdconf.c
  117.  */
  118.  
  119. GDCobj       *GDCnew();
  120. void         GDCinit(/* gdc, FILE* gdc.conf file */);
  121. void         GDCdestroy(/* gdc */);
  122.  
  123. boolean      GDCignore(/* gdc, char *filename */);
  124.  
  125. boolean      GDCCanRead(/* gdc, hostname, ipnum */);
  126. boolean      GDCCanBrowse(/* gdc, hostname, ipnum */);
  127. boolean      GDCCanSearch(/* gdc, hostname, ipnum */);
  128.  
  129. boolean      GDCExtension(/*gdc, ext, Gtype, Prefix*/);
  130.  
  131.  
  132. #endif /* GOPHERDCONF_H */
  133.